<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理分区</title>
<!-- 导入jquery核心类库 -->
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/jquery-1.8.3.js"></script>
<!-- 导入easyui类库 -->
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/js/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/js/easyui/ext/portal.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/css/default.css">	
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/easyui/ext/jquery.portal.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath }/js/easyui/ext/jquery.cookie.js"></script>
<script
	src="${pageContext.request.contextPath }/js/easyui/locale/easyui-lang-zh_CN.js"
	type="text/javascript"></script>
<script type="text/javascript">
	function doAdd(){
		$('#addRecriutPlanWindow').window("open");
	}
	
	function doEdit(){
		alert("修改...");
	}
	
	function doDelete(){
		alert("删除...");
	}
	
	function doSearch(){
		$('#searchWindow').window("open");
	}
	
	function doExport(){
		alert("导出");
	}
	
	function doImport(){
		alert("导入");
	}
	
	//工具栏
	var toolbar = [ {
		id : 'button-search',	
		text : '查询',
		iconCls : 'icon-search',
		handler : doSearch
	}, {
		id : 'button-add',
		text : '增加',
		iconCls : 'icon-add',
		handler : doAdd
	}, {
		id : 'button-edit',	
		text : '修改',
		iconCls : 'icon-edit',
		handler : doEdit
	},{
		id : 'button-delete',
		text : '删除',
		iconCls : 'icon-cancel',
		handler : doDelete
	},{
		id : 'button-import',
		text : '导入',
		iconCls : 'icon-redo',
		handler : doImport
	},{
		id : 'button-export',
		text : '导出',
		iconCls : 'icon-undo',
		handler : doExport
	}];
	// 定义列
	var columns = [ [ {
		field : 'planid',
		checkbox : true,
	}, {
		field : 'recruitjob',
		title : '招聘岗位',
		width : 120,
		align : 'center'
	},{
		field : 'recruitnum',
		title : '拟招人数',
		width : 80,
		align : 'center'
	}, {
		field : 'writerdate',
		title : '填报日期',
		width : 80,
		align : 'center'
	}, {
		field : 'companyname',
		title : '公司名称',
		width : 120,
		align : 'center'
	}, {
		field : 'companyaddr',
		title : '公司地址',
		width : 120,
		align : 'center'
	}, {
		field : 'workdate',
		title : '到岗时间',
		width : 80,
		align : 'center'
	}, {
		field : 'peopletype',
		title : '人员性质',
		width : 100,
		align : 'center'
	} , {
		field : 'money',
		title : '薪资',
		width : 100,
		align : 'center'
	} , {
		field : 'workrequest',
		title : '岗位要求',
		width : 100,
		align : 'center'
	} , {
		field : 'resultrequest',
		title : '结果反馈',
		width : 100,
		align : 'center'
	} , {
		field : 'leaderrequest',
		title : '领导意见',
		width : 200,
		align : 'center'
	} ] ];
	
	$(function(){
		// 先将body隐藏，再显示，不会出现页面刷新效果
		$("body").css({visibility:"visible"});
		
		// 收派标准数据表格
		$('#grid').datagrid( {
			iconCls : 'icon-forward',
			fit : true,
			border : true,
			rownumbers : true,
			striped : true,
			pageList: [30,50,100],
			pagination : true,
			toolbar : toolbar,
			url : "/recruitPlanPageQuery.action",
			idField : 'id',
			columns : columns,
			onDblClickRow : doDblClickRow
		});
		
		// 添加、修改分区
		$('#addSubareaWindow').window({
	        title: '添加修改分区',
	        width: 800,
	        modal: true,
	        shadow: true,
	        closed: true,
	        height: 360,
	        resizable:false
	    });
		
		// 查询分区
		$('#searchWindow').window({
	        title: '查询分区',
	        width: 400,
	        modal: true,
	        shadow: true,
	        closed: true,
	        height: 400,
	        resizable:false
	    });
		// 查询分区
		$('#addRecriutPlanWindow').window({
	        title: '添加招聘计划',
	        width: 800,
	        modal: true,
	        shadow: true,
	        closed: true,
	        height: 360,
	        resizable:false
	    });
		$("#btn").click(function(){
			alert("执行查询...");
		});
		
		$("#onBtn").click(function(){
			
			$("#addRecriutPlanWindow").window('close');
		});
		
	});

	function doDblClickRow(){
		alert("双击表格数据...");
	}
</script>	
</head>
<body class="easyui-layout" style="visibility:hidden;">
	<div region="center" border="false">
    	<table id="grid"></table>
	</div>
	<!-- 添加 招聘计划 -->
	<div class="easyui-window" title="添加 招聘计划 " id="addRecriutPlanWindow" collapsible="false" minimizable="false" maximizable="false" style="top:20px;left:200px">
		<script type="text/javascript">
        	$(function(){
        		$("#okBtn").click(function(){
        			var vali = $("#addRecriutPlanForm").form('validate');
        			if(vali){
        				$("#addRecriutPlanForm").submit();
        				
        			}else{
        				$.messager.alert('提示信息','您填写的信息不完整','warning');
        			}
        		});
        		
        	})
        </script>
		
		<div style="overflow:auto;padding:6px;" border="false" align="center">
			<form id="addRecriutPlanForm" action="/addRecriutPlan.action" method="post" > 
	            <table border="0" class="table-edit" width="100%" align="center">
	           		<tr class="title">
						<td colspan="6"><b>招聘计划表</b></td>
					</tr>
	                    <tr >
	                        <td class="easyui-validatebox">
	                            <label >招聘岗位：</label>
	                        </td>
	                        <td >
	                            <input type="text" name="recruitjob" class="easyui-validatebox" required="true"/>
	                        </td>
	                        <td >
	                            <label >拟招人数：</label>
	                        </td>
	                        <td  >
	                            <input type="text" name="recruitnum" class="easyui-validatebox" required="true"/>
	                        </td>
	                        <td >
	                            <label >填报日期：</label>
	                        </td>
	                        <td  >
	                            <input type="text" name="writerdate" class="easyui-datebox" required="true"/>
	                        </td>
	                    </tr>
	                    <tr >
	                        <td >
	                            <label >公司名称：</label>
	                        </td>
	                        <td  >
	                            <input type="text" name="companyname" class="easyui-validatebox" required="true"/>
	                        </td>
	                        <td >
	                            <label >公司地址：</label>
	                        </td>
	                        <td  >
	                            <input class="easyui-validatebox" required="true" type="text" name="companyaddr" />
	                        </td>
	                        <td >
	                            <label >到岗时间：</label>
	                        </td>
	                        <td >
	                            <input required="true" type="text" name="workdate" class="easyui-datebox"/>
	                        </td>
	                    </tr>
	                    <tr>
	                        <td >
	                            <label >人员性质：</label>
	                        </td>
	                        <td  >
	                            <input type="text" name="peopletype" class="easyui-validatebox" required="true"/>
	                        </td>
	                        <td  align="right">
	                            <label >薪资：</label>
	                        </td>
	                        <td  >
	                            <input type="text" name="money" class="easyui-validatebox" required="true"/>
	                        </td>
	                        <td >
	                            <label >岗位要求：</label>
	                        </td>
	                        <td  >
	                            <input type="text" class="easyui-validatebox" name="workrequest" required="true"/>
	                        </td>
	                    </tr>
	                     <tr>
	                        <td  rowspan="3">
	                            <label >结果反馈：</label>
	                        </td>
	                        <td colspan="2" rowspan="3">
	                            <textarea name="resultrequest" style="width: 240px; height: 70px;"></textarea>
	                        </td>
	                        <td  align="right" rowspan="3">
	                            <label >领导意见：</label>
	                        </td>
	                        <td colspan="2" rowspan="3">
	                            <textarea name="leaderrequest" style="width: 240px; height: 70px;"></textarea>
	                        </td>
	                    </tr>
	                    <tr></tr>
	                    <tr></tr>
	                    <tr align="center">
	                        <td id="btns" colspan="6">
	                            <a id="okBtn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">提交</a>
	                            &nbsp;&nbsp;&nbsp;&nbsp;
	                             <a id="onBtn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-no'">取消</a>
	                        </td>
	                    </tr>
	            </table>
	        </form>
		</div>
	</div>
	<!-- 查询分区 -->
	<div class="easyui-window" title="查询分区窗口" id="searchWindow" collapsible="false" minimizable="false" maximizable="false" style="top:20px;left:200px">
		<div style="overflow:auto;padding:5px;" border="false">
			<form>
				<table class="table-edit" width="80%" align="center">
					<tr class="title">
						<td colspan="2">查询条件</td>
					</tr>
					<tr>
						<td>省</td>
						<td><input type="text" name="region.province"/></td>
					</tr>
					<tr>
						<td>市</td>
						<td><input type="text" name="region.city"/></td>
					</tr>
					<tr>
						<td>区（县）</td>
						<td><input type="text" name="region.district"/></td>
					</tr>
					<tr>
						<td>关键字</td>
						<td><input type="text" name="addresskey"/></td>
					</tr>
					<tr>
						<td colspan="2"><a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a> </td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</body>
</html>